home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 9 / Night Owl CD-ROM (NOPV9) (Night Owl Publisher) (1993).ISO / 032a / acctxt2.zip / SECURE.TXT < prev    next >
Text File  |  1993-02-10  |  26KB  |  510 lines

  1. Microsoft Access Security
  2.  
  3.  
  4. Purpose
  5. -------
  6.  
  7. The purpose of this document is to explain the Microsoft Access security 
  8. model.  The hope is that if the user understands the intricacies of 
  9. security, and is conscientious, he will be able to safely and successfully 
  10. use Microsoft Access security in his databases.
  11.  
  12. Examples of scenarios that have caused difficulty for people in the past 
  13. have been set apart under the heading of Gotcha.  These are intended to 
  14. give practical examples of common misunderstandings, and to explain why 
  15. Microsoft Access security works the way it does.
  16.  
  17.  
  18. Overview
  19. --------
  20.  
  21. Microsoft Access security consists of 2 parts which are stored in different 
  22. places.  Information regarding the permissions that users and groups have 
  23. on the objects in a database is stored in the database itself.  This way 
  24. the permission information travels with the .mdb file in which the objects 
  25. exist.  All other security information is stored in system.mda.  This 
  26. includes:  which Users & Groups exist;  which Groups each User belongs to;  
  27. and User logon passwords.  In Microsoft Access parlance, a system.mda 
  28. defines a "Workgroup".
  29.  
  30.  
  31. Logging On
  32. ----------
  33.  
  34. Each User and Group has associated with it a Security ID (SID).  The SID is 
  35. a binary string that uniquely identifies the User or Group.  When a user 
  36. logs on, Microsoft Access looks in the MSysAccounts table of the system.mda 
  37. specified in the user's msaccess.ini for a user of the same name (case-
  38. insensitive).  If a user with the same name is found, it then validates the 
  39. password (case-sensitive).  If the password matches, the SID of the user is 
  40. retrieved and saved in an internal structure.  The password is only used to 
  41. validate the user when he logs on.  Other than validating the identity of 
  42. the user when he logs on, it has no effect on security.
  43.  
  44. By default, Microsoft Access first attempts to logon as the user Admin, 
  45. with a blank password.  If this logon fails, the user is presented with the 
  46. Logon dialog.  If a user name and password were specified on the command 
  47. line (using the /USER and /PWD flags), Microsoft Access first tries to 
  48. logon using that user name and password.  If this logon fails, the user is 
  49. presented with the Logon dialog.  Once logged on, the user's SID is 
  50. retrieved.  This SID is used for all subsequent operations within Microsoft 
  51. Access.
  52.  
  53.  
  54. Users and Groups
  55. ----------------
  56.  
  57. Each user can be a member of 1 or more groups.  Users & Groups share the 
  58. same namespace.  This means that you can't have both a group and user with 
  59. the same name.
  60.  
  61. Microsoft Access defines 3 default groups:  Admins, Users, and Guests.  
  62. Whenever a user is added to the system.mda, they are automatically given 
  63. membership in the group Users, and they cannot be removed from the Users 
  64. group.  There is one exception to this rule---the user Guest CAN be removed 
  65. from the Users group.  The Admins group must always have at least one 
  66. member.
  67.  
  68. Microsoft Access defines 2 users:  Admin and Guest.  The user Admin is a 
  69. member of the Admins and Users groups.  The user Guest is a member of the 
  70. Guests group (only).
  71.  
  72. The pre-defined groups (Admins, Users, and Guests) cannot be deleted.  The 
  73. user Guest cannot be deleted, though the user Admin CAN (and should be to 
  74. preserve security) if there is at least one other member of the Admins 
  75. group.
  76.  
  77. Each user and group has a SID associated with it.  The SIDs of the Users 
  78. and Guests groups, and of the Admin and Guest users, are the same in all 
  79. Microsoft Access installations.  The SID of the Admins group, however, is 
  80. unique across all Microsoft Access installations.  The SID of the Admins 
  81. group is determined when Microsoft Access is installed.  This prevents 
  82. someone who is in the Admins group of one system.mda from being able to 
  83. have the permissions of any other Admins group.
  84.  
  85. Gotcha:  If you delete the user Admin, and then create another user 
  86. named Admin, the SID of the new Admin will NOT be the same as the SID 
  87. of the Admin that exists in an unsecure system.  This is because the 
  88. Admin user that you create will have a different PIN that the Admin 
  89. user that exists in a freshly-installed system.mda.
  90.  
  91. The SID of the Admins group is a function of the Setup disk serial number 
  92. and the User and Company names given (case-insensitive).  Therefore, it is 
  93. critical that the disks used to install Microsoft Access be kept in a safe 
  94. place, and that the User and Company names be recorded.  In the event that 
  95. the system.mda has to be recreated, the same installation disks must be 
  96. used.
  97.  
  98. The SIDs of users and groups that you create are a function of the user or 
  99. group name (case-sensitive) and Personal Identification Number (PIN) that 
  100. you specify.  For this reason it is critical that the user and group names 
  101. and their PINs be backed up.  If there is ever a need to recreate the 
  102. system.mda, you will need the name and PIN of each user and group that was 
  103. in the system.mda.  Note that by using different PINs, it possible for 
  104. users and groups in different system.mda's to have the same name, but they 
  105. will actually be different accounts as far as Microsoft Access security is 
  106. concerned because they have different SIDs.
  107.  
  108. Gotcha:  When you setup Microsoft Access, the User and Company names 
  109. are written to Disk #1.  If you then give anyone else your disks to 
  110. setup from, Microsoft Access doesn't prompt for the User and Company 
  111. name.  The Admins group in the system.mda that is created will have 
  112. the same SID as the Admins group in your system.mda.  This means that 
  113. anyone who uses that new system.mda will have all the permissions that 
  114. you do, in any databases that you have permissions.  While this 
  115. functionality wasn't intended as a form of copy protection, it is a 
  116. good incentive to abide by the License Agreement.
  117.  
  118.  
  119. Permissions
  120. -----------
  121.  
  122. There are 2 types of permissions:  Explicit and Implicit.  Explicit 
  123. permissions are those given directly to a user.  When they are granted, no 
  124. other users are affected.  Implicit permissions are those granted to a 
  125. group.  When they are granted, all users who are members of the group get 
  126. the permissions of the group.  Implicit permissions belong to the group, 
  127. not the users.  If a user is removed from the group, he no longer has the 
  128. permissions of the group.  If the permissions of the group are changed, all 
  129. users in the group are affected.
  130.  
  131. When a user attempts to do something, he will get the least restrictive 
  132. permissions of:  1) all the groups in which he is a member (his Implicit 
  133. permissions), and 2) those given directly to him (his Explicit 
  134. permissions.)
  135.  
  136. In the Microsoft Access Permissions dialog, only the Explicit permissions 
  137. are displayed.  This is a limitation of v.1.0.  To view implicit 
  138. permissions, view the permissions of each group that the user is a member 
  139. of.
  140.  
  141. The Admins group of the system.mda in use when the database was created 
  142. will always have permission to change permissions on all objects in the 
  143. database.  This permission cannot be taken away by anyone!!!  This 
  144. permission remains even when all permissions have been revoked from the 
  145. Admins group, and isn't displayed in the Permissions dialog.  It should 
  146. therefore be obvious that it is very important to know and keep track of 
  147. which system.mda was in use when the database was created.  To stress this 
  148. point, italics will be used throughout this document where it comes up.
  149.  
  150. The Users group initially has Full permissions on all objects created in 
  151. the database.  The Guests group has Read Definition and/or Read Data 
  152. permissions on them, as appropriate for the object type.  Basically, Guests 
  153. can read all objects and data, but can't change anything.
  154.  
  155. Permissions on an object can be changed by anyone having permissions to do 
  156. so.  The following users have this permission:  members of the Admins group 
  157. of the system.mda in use when the database was created;  the creator of the 
  158. database (it's owner);  the creator of the object (it's owner); and anyone 
  159. who has Full permissions on the object, either explicitly or implicitly.
  160.  
  161. Gotcha:  Jane gives Joe a database that she created.  Joe is a member 
  162. of the Users group, and no other groups.  He is using a different 
  163. system.mda (the SID of the Admins group of his system.mda is different 
  164. from the SID of the Admins group in Jane's system.mda).  Jane's 
  165. database is "unsecure", meaning that the Users group has Full 
  166. permission on all objects.  Joe revokes Full permissions from the 
  167. Users group on a Table1.  From that point forward, Joe can no longer 
  168. change permissions on that Table1.  If he also revoked Read Data 
  169. permissions, he has prevented himself from being able to read Table1, 
  170. because he no longer has permission to do so.  For both these cases, 
  171. he just revoked his own permissions on the Table1.  Because Joe isn't 
  172. a member of the Admins group of the system.mda in use when the 
  173. database was created, and because he didn't create Table1, he's 
  174. completely locked out of Table1 until Jane (using her own system.mda) 
  175. gives him permissions again.
  176.  
  177. All users always have permission to open any database and create objects in 
  178. it.  Microsoft Access relies on operating system security to prevent a user 
  179. from being able to open a database.
  180.  
  181. Gotcha:  Even if a user doesn't have an account in your system.mda, he 
  182. can use any other system.mda in which he has an account to logon to 
  183. Microsoft Access.  Then he can open any database that he can get to 
  184. through the operating system.  Once the database is open, he can see 
  185. which objects exist, and create new objects.  There is no method to 
  186. prevent creation of objects.
  187.  
  188. It is possible for a user to have permissions on an object in a database, 
  189. and not be able to see those permissions in the Permissions dialog.  This 
  190. will happen if the user was assigned permissions in the database and then 
  191. was deleted from the system.mda.  The permissions given to the user are 
  192. stored in the .mdb, and aren't removed when the user is removed.  The 
  193. following steps will show these permissions:
  194.  
  195. 1. Set the Show System Objects option to Yes
  196. 2. Give yourself Read Data permissions on the MSysACEs table
  197.    If you don't have permissions to do this, you're not a member of the 
  198.    Admins group of the system.mda in use when the database was created, 
  199.    and you didn't create the database.
  200. 3. Attach to or import the MSysAccounts table from the system.mda 
  201.    currently in use
  202.    If you don't have permissions to do this, you're not a member of the 
  203.    Admins group of the system.mda currently in use.
  204. 4. Run this query:
  205.    SELECT DISTINCTROW MSysObjects.Name AS Object, MSysAccounts.Name As 
  206.    UserGroup FROM MSysACEs, MSysAccounts, MSysObjects, MSysACEs LEFT JOIN 
  207.    MSysAccounts ON MSysACEs.SID = MSysAccounts.SID, MSysACEs INNER JOIN 
  208.    MSysObjects ON MSysACEs.ObjectId = MSysObjects.Id;
  209.  
  210. This will show the names of all users and groups who have permissions on 
  211. all objects in the database.  If the UserGroup field is blank, it means 
  212. that the user or group doesn't exist in your system.mda, yet still has some 
  213. kind of permissions on that object.  Disclaimer:  The query above works 
  214. fine in Microsoft Access 1.0.  However, the Microsoft Access system tables 
  215. (MSys*) are officially "undocumented", and are subject to change in future 
  216. versions.
  217.  
  218.  
  219. Ownership
  220. ---------
  221.  
  222. Ownership is a very important part of Microsoft Access' security model.  
  223. The SID of the user who creates a database is considered the "owner" of the 
  224. database.  He will always have permission to give himself Full Permission 
  225. on any object in the database, regardless of who creates the object, or 
  226. what permissions are on the object.  He will therefore also always have 
  227. permissions to give anyone else permissions on any object in the database.
  228.  
  229. The SID of the user who creates an object is considered the "owner" of the 
  230. object.  He will always have permission to change permissions on the 
  231. object, even if the database owner has revoked his permissions on the 
  232. object.
  233.  
  234. The Admins group of the system.mda in use when the database was created 
  235. will always have permissions to change permissions on any object in that 
  236. database.
  237.  
  238. The only way to transfer ownership of a database or object is to recreate 
  239. it.  For databases, this means doing a File New Database and importing all 
  240. the objects from the old database.  Table relationships will have to be 
  241. recreated after importing, as they're not preserved when importing or 
  242. exporting.
  243.  
  244. For objects, ownership can be transferred by importing or exporting the 
  245. object, or by copying and pasting it.  These operations essentially create 
  246. a brand new object, one that is completely unsecured.  Note that for both 
  247. of these situations, the person doing the importing/exporting or 
  248. copy/pasting must have permission to read the objects in the first place.
  249.  
  250. Gotcha:  As mentioned above, the Admin and Guest users have the same 
  251. SID in all system.mda's.  It is therefore critical to security that 
  252. the Admin and Guest users NOT create (are the owner of) any objects or 
  253. databases.  If they do, anyone who has Microsoft Access and can get to 
  254. the database .mdb file can open it and have Full permission on the 
  255. objects created by Admin or Guest, and all objects in the database if 
  256. either of these users created the database.
  257.  
  258.  
  259. The "Hole"
  260. ----------
  261. By default, the Users and Guests groups have Read Data permissions on the 
  262. MSysObjects table.  For various technical reasons, this is necessary to 
  263. allow the user to do File Load From Query in the Filter window.
  264.  
  265. The astute reader will see that MSysObjects contains a field named "Owner", 
  266. and he will figure out that it contains the SID of the owner of each 
  267. object.  The astute reader will also realize that the SID field in the 
  268. MSysAccounts table of system.mda contains his own SID.  Because everyone 
  269. has Read Data permissions on MSysObjects, it would be possible to read the 
  270. SID of the owner of any given object, and replace his SID in MSysAccounts 
  271. with it.  The next time he logged on, he would have the SID of the owner of 
  272. the object, and all rights associated with it.  He could change permissions 
  273. on the objects, and therefore do anything he wanted to with it.
  274.  
  275. SIDs are binary fields.  When MSysObjects is browsed, the binary fields are 
  276. truncated at the first null terminator (ASCII 0).  Additionally, any 
  277. characters whose ASCII values are below 32 will display as garbage.  All of 
  278. this essentially prevents someone from being able to edit or copy and paste 
  279. this value directly.  However, it would be a relatively simple matter to 
  280. change your own SID using Microsoft Access Basic code or a query.
  281.  
  282. Fortunately, there is a way to patch this security hole:
  283.  
  284. 1.  Make a backup of you database!!!
  285. 2.  Open your database
  286. 3.  Set the Show System Objects option to Yes
  287. 4.  Select Permissions from the Security menu
  288. 5.  Give the Users group Read Definition permissions on MSysObjects
  289. 6.  Revoke Read Definition permissions on MSysObjects from the Users group
  290. 7.  Repeat steps 5 & 6 for the Guests group
  291.  
  292. This will prevent someone from reading the SID from the Owner field and 
  293. writing it into his own MSysAccounts table.  The downside is that when 
  294. people who aren't in the Admins group (of the system.mda in use when the 
  295. database was created) attempt to use the "Load From Query" functionality 
  296. while in MyApp.mdb, they will get an error that says "No permission for 
  297. 'MSysObjects'".  The only people who will be able to use the "trick" above 
  298. are the person who created the database, and anyone who is a member of the 
  299. Admins group of the system.mda in use when the database was created.  It is 
  300. not recommended that you repeat steps 5 & 6 for them.
  301.  
  302. Needless to say, this hole will be plugged in a future version of Microsoft 
  303. Access.  Disclaimer:  Again, the Microsoft Access system tables (MSys*) are 
  304. officially "undocumented", and are subject to change in future versions.  
  305. Don't count on any information regarding them to be applicable to anything 
  306. but Access version 1.0.
  307.  
  308.  
  309. The "Run with Owner's Permissions" Query Property
  310. -------------------------------------------------
  311.  
  312. Microsoft Access queries have an property called "Run with Owner's 
  313. Permissions" (RWOP).  This is in the Query Properties dialog.  If this 
  314. property is checked, the permissions of the owner of the query are the only 
  315. permissions that are considered when attempting to access tables or queries 
  316. that the query is dependent on.
  317.  
  318. Gotcha:  Joe has Read Definition permissions on the Salary table, but 
  319. not Read Data.  Joe creates Query1, which is based on the Salary 
  320. table.  Joe has left RWOP turned on.  Joe is unable to execute the 
  321. query, because he doesn't have Read Data permissions on the Salary 
  322. table.  This much is intuitive.  Jane created the Salary table, and 
  323. has Full permission on it.  Jane tries to execute Query1.  She cannot, 
  324. because the RWOP option of Query1 is turned on, and the owner of the 
  325. query (Joe) doesn't have Read Data permissions on the Salary table.  
  326. While this may not be entirely intuitive, it is correct functionality.
  327.  
  328. Only the owner (creator) of a query may save it if the RWOP property is 
  329. turned on.  Even the database owner or members of the Admins group of the 
  330. system.mda in use when the database was created can't save a query created 
  331. by another user if the RWOP property is turned on.  It would be a security 
  332. breach to allow them to.  Note though, that anyone with Modify Definition 
  333. permissions on the query can uncheck RWOP and successfully save the query.  
  334. This may lead to other complications if other people were using the query 
  335. and depending on RWOP being there.
  336.  
  337. This functionality extends to the QueryDef object as well.  Only the owner 
  338. of a query can change the query using the "Set Q.SQL = MySQLString$" syntax 
  339. if MySQLString$ ends with "WITH OWNER ACCESS OPTION;".
  340. Common Scenarios
  341.  
  342.  
  343. Securing an Existing Database
  344. -----------------------------
  345.  
  346. You've written an application using Microsoft Access---call it MyApp.mdb.  
  347. You've created all the objects while you were logged on as Admin (the 
  348. default.)  Now you want to "secure" the database.  Here are the steps to 
  349. follow to do so:
  350.  
  351. 1.  Make a backup of MyApp.mdb!!!
  352. 2.  Choose Change Password from the security menu and give a password to 
  353.     the user Admin.
  354. 3.  Create a new user and add him to the Admins group.  For this 
  355.     example, the user is Joe.
  356. 4.  Exit Microsoft Access and restart it, giving Joe as the user when 
  357.     the Logon dialog is given.
  358. 5.  Create a new database---call it MyApp2.mdb
  359.     This will establish Joe as the database owner.
  360. 6.  Import all the objects from MyApp.mdb into MyApp2.mdb
  361.     This will establish Joe as owner of all the objects.
  362. 7.  If you had any table relationships, recreate them in MyApp2.mdb
  363. 8.  Revoke Full permissions from the Users group on all objects, leaving 
  364.     them with whatever other permissions you like.  You may also want to 
  365.     revoke permissions from the Guests group.
  366. 9.  If desired, create any of your own groups and users, and give them 
  367.     appropriate permissions on all the objects.
  368. 10.  Rename MyApp.mdb to MyApp.old and rename MyApp2.mdb to MyApp.mdb.
  369.  
  370. Your database is now secure.  The only people who can get into the objects 
  371. in MyApp.mdb are those you gave permissions to in steps 8 & 9, and anyone 
  372. who is a member of the Admins group of your system.mda.
  373.  
  374.  
  375. Unsecuring a Secured Database
  376. -----------------------------
  377.  
  378. You've followed the steps under Securing an Existing Database, above.  Joe 
  379. is the owner of the database and all objects in it.  The Admins group of 
  380. Joe's system.mda has permissions to change permissions on any object in the 
  381. database.  The goal here is to make the user Admin the owner of the 
  382. database and all objects in it, and to give the Users group Full 
  383. permissions on all objects.  Remember, the SIDs of the user Admin and the 
  384. Users group are constant in all system.mda's, so this will effectively give 
  385. everyone Full permissions on all objects in the database, and make them the 
  386. database owner as well.
  387.  
  388. 1.  Make a backup of MyApp.mdb!!!
  389. 2.  Boot Microsoft Access as a member of the Admins group of the 
  390.     system.mda in use when MyApp.mdb was created.
  391. 3.  Give the Users group Full permissions on all objects in the 
  392.     database.
  393. 4.  Edit your msaccess.ini file so that SystemDB points to a 
  394.     system.mda in which no users exist.
  395. 5.  Exit Microsoft Access and restart it logging on as the user Admin.  
  396.     Note that this Admin MUST be the same Admin that exists in the 
  397.     "clean" system.mda that is created when you setup Microsoft Access 
  398.     so that the SID is correct.
  399. 6.  Create a new database (call it MyApp2.mdb)
  400. 7.  Import all the objects from MyApp.mdb into MyApp2.mdb
  401.  
  402. Your database is now completely unsecured.  Anyone who can to the 
  403. MyApp2.mdb file have Full permissions on all the objects in it.
  404.  
  405.  
  406. Protecting Your Code
  407. --------------------
  408.  
  409. You've written a bunch of Microsoft Access Basic code that you want to 
  410. distribute, perhaps as a Library Database, but you don't want anyone to be 
  411. able to read your code.  The modules are in MyApp.mdb, and were all created 
  412. while you were logged on as Admin.  Assuming that you're starting from a 
  413. completely unsecure configuration, here are the steps to secure the code:
  414.  
  415. 1.  Make a backup of MyApp.mdb!!!
  416. 2.  Choose Change Password from the security menu and give a password to 
  417.     the user Admin.
  418. 3.  Create a new user and add him to the Admins group.  For this 
  419.     example, the user is Joe.
  420. 4.  Exit Microsoft Access and restart it, giving Joe as the user when 
  421.     the Logon dialog is given.
  422. 5.  Open MyApp.mdb
  423. 6.  For each module you want secured, do the following:
  424.     a.  Open the module in design mode
  425.     b.  File Save Text to save the module to a text file
  426.     c.  File Close
  427.     d.  Delete the module
  428.     e.  Create a new module
  429.     f.  File Load Text to bring the text file from step b back in
  430.     g.  File Save, giving the original module name
  431.         This will establish Joe as owner of  the modules.
  432. 7.  Revoke all permissions from the Users and Guests groups on all the 
  433.     modules.  All users will still be able to execute the code---there's 
  434.     no way to prevent someone from being able to execute code.
  435.  
  436. Your modules are now secured so that nobody except Joe and members of the 
  437. Admins group of the system.mda in use when MyApp.mdb was created can read 
  438. the modules.
  439.  
  440.  
  441. Moving a Database to Another System.mda
  442. ---------------------------------------
  443.  
  444. You are Joe, and have written MyApp.mdb and want to give it to Jane who is 
  445. using a different system.mda.  You want Jane to have complete 
  446. administrative authority over your database.  The problem is this:  The 
  447. Admins group of Jane's system.mda doesn't have any permissions on anything 
  448. in MyApp.mdb.
  449.  
  450. There are 2 variations of this scenario:
  451.  
  452. Variation #1:  MyApp.mdb is completely unsecured (the Users group has 
  453. Full permissions on everything).
  454.  
  455. The situation here is as follows...  The user Admin created MyApp.mdb 
  456. and all the objects in it, and is therefore the owner of everything.  
  457. The Admins group of Joe's system.mda has permissions to change 
  458. permissions on all the objects in MyApp.mdb.  The Users group (which 
  459. has the same SID in all Microsoft Access installations) has Full 
  460. permissions on all objects in MyApp.mdb.  Jane's system.mda is 
  461. unsecure (the Admin password is blank, and there are no user accounts 
  462. or groups.)
  463.  
  464. To give MyApp.mdb to Jane, and have her get complete administrative 
  465. authority over it, follow these steps:
  466.  
  467. 1.  Make a backup of MyApp.mdb!!!
  468. 2.  Boot Microsoft Access using Jane's system.mda.
  469. 3.  Create a new database---call it MyApp2.mdb
  470.     This will establish Admin as the database owner.
  471. 4.  Import all the objects from MyApp.mdb into MyApp2.mdb
  472.     This will establish the user Admin as owner of all the objects, and 
  473.     give the Admins group of Jane's system.mda permission to change 
  474.     permissions on all objects created in MyApp2.mdb.
  475. 5.  If you had any table relationships, recreate them in MyApp2.mdb
  476. 6.  Rename MyApp.mdb to MyApp.old and rename MyApp2.mdb to MyApp.mdb.
  477.  
  478. Variation #2:  MyApp.mdb is secured using the steps under Securing an 
  479. Existing Database.
  480.  
  481. To give MyApp.mdb to Jane, and have the Admins group of her system.mda 
  482. get complete administrative authority over it, follow these steps:
  483.  
  484. 1.  Follow the instructions under Unsecuring a Secured Database, above
  485. 2.  Follow the instructions under Variation #1, above.
  486.  
  487. For all intents and purposes, Jane is now the "owner" of MyApp.mdb and all 
  488. objects in it, and Joe is just another user.  Under both these scenarios, 
  489. you can include steps 1-4 and 8-10 of Securing an Existing Database, above, 
  490. as necessary to make the database secured under Jane's system.mda.
  491.  
  492.  
  493. Miscellaneous Tidbits
  494. ---------------------
  495.  
  496. The User() function in Microsoft Access Basic returns the name of the 
  497. current user.  This is not the same as the SID.  As mentioned under Users 
  498. and Groups, above, it is possible for 2 users in different system.mda's to 
  499. have the same name but different SIDs.
  500.  
  501. Gotcha:  This can cause a problem if 2 people that are using different 
  502. system.mda's have the same name but different PINs (and therefore 
  503. different SIDs).  For example, if you are using the User() function to 
  504. log activity, and both are using your database, the activity logging 
  505. could be inaccurate.  These are actually 2 different accounts, even 
  506. though their user names are the same.
  507.  
  508.  
  509.  
  510.